package com.yaozheng.vocationaltraining.fragment;

import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.Click;
import org.androidannotations.annotations.EFragment;
import org.androidannotations.annotations.ViewById;

import android.content.Intent;
import android.widget.TextView;

import com.yaozheng.vocationaltraining.R;
import com.yaozheng.vocationaltraining.activity.HomeActivity;
import com.yaozheng.vocationaltraining.utils.Constants;

/**
 * 速查菜单
 * 
 * @author Administrator
 * 
 */
@EFragment(R.layout.fragment_quick_search_menu)
public class QuickSearchMenuFragment extends BaseFragment {

	@ViewById
	TextView headTitleText;

	@AfterViews
	public void initView() {
		headTitleText.setText("助销");
	}

	public HomeActivity getHomeActivity() {
		return (HomeActivity) getActivity();
	}

	/**
	 * 百问百答点击
	 */
	@Click(R.id.questionsAndAnswersLayout)
	public void questionsAndAnswersClick() {
		Intent intent = new Intent();
		intent.setClassName(getContext(),
				Constants.HUNDRED_QUESTIONS_ENCYCLOPEDIA_ACTIVITY_CLASS_NAME);
		getActivity().startActivity(intent);
	}

	/**
	 * 宝沃辞典点击
	 */
	@Click(R.id.poWoDictionaryText)
	public void poWoDictionaryClick() {
		Intent intent = new Intent();
		intent.setClassName(getContext(),
				Constants.PO_WO_DICTIONARY_ACTIVITY_CLASS_NAME);
		getActivity().startActivity(intent);
	}

//	/**
//	 * 购车计算器
//	 */
	@Click(R.id.BuyCalculatorLayout)
	public void BuyCalculatorClick() {
		getHomeActivity().openBuyCalculatorFragment();

//		Intent intent = new Intent();
//		intent.setClassName(getContext(),
//				Constants.BUYCALCULATOR_ACTIVITY_CLASS_NAME);
//		getActivity().startActivity(intent);
	}
//
//	/**
//	 * 维保百科点击
//	 */
//	@Click(R.id.maintenanceEncyclopediaLayout)
//	public void maintenanceEncyclopediaClick() {
//		Intent intent = new Intent();
//		intent.setClassName(getContext(),
//				Constants.MAINTENANCE_ENCYCLOPEDIA_ACTIVITY_CLASS_NAME);
//		getActivity().startActivity(intent);
//	}
}
